package volley

class Field extends Venue {

    String contact
    Cost cost

    static hasMany = [teams:Team]

    static constraints = {
    }

    static embedded = ['cost']
}

class Cost{

    public Cost(){
        
    }

    public Cost(String totalPrice, String timeInHour){
        this.totalPrice = new BigDecimal(totalPrice)
        this.timeInHour = new Integer(timeInHour)
    }

    public Cost(BigDecimal totalPrice, Integer timeInHour){
        this.totalPrice = totalPrice
        this.timeInHour = timeInHour
    }

    BigDecimal totalPrice
    Integer timeInHour

    String toString(){
        return "$totalPrice/$timeInHour"
    }

}
